﻿set(NCTI_PROJECT ${NCTI_CMD_DEMO})

include_directories(${INC_PATH_NCTI})
include_directories(${INC_PATH_PYTHON})

FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_BASE})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_RENDER})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_PLUGINMANAGER})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_OBJECT})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_PLUGIN})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_PUBFUN})
FUN_FIND_ALL_HEADFILE_DIR(${CMAKE_CURRENT_SOURCE_DIR} "")

FUN_FIND_ALL_HEADFILE_DIR(${CMAKE_CURRENT_SOURCE_DIR}/../${NCTI_PLUGIN_DEMO} "")


file(GLOB_RECURSE project_cpps *.cpp *c *cc *h)
set(all_files_cpp ${project_cpps})
source_group_by_dir(all_files_cpp ${CMAKE_CURRENT_SOURCE_DIR})

#将指定的路径添加到链接器的库搜索路径中
link_directories(${LIB_PATH_NCTI})
link_directories(${LIB_PATH_PYTHON})

#DLL library
add_library(${NCTI_PROJECT} 
  SHARED 
  ${all_files_cpp}
)

#add link library
target_link_libraries(${NCTI_PROJECT} 
  ${NCTI} 
  ${NCTI_BASE} 
  ${NCTI_RENDER} 
  ${NCTI_PLUGINMANAGER}
  ${NCTI_OBJECT} 
  ${NCTI_PLUGIN}
  ${NCTI_PUBFUN}
  ${NCTI_DATA_INTEROP}
  python${NCTI_PYTHON_VERSION}
  ${NCTI_PLUGIN_DEMO}
)